Part Number Hot Search : 
4N60B 1N5367B OP04CZ AD996112 BC858C DM7405N K3702 330M35
Product Description
Full Text Search
 

To Download EM78611 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 EM78611
Universal Serial Bus Microcontroller Series
Preliminary
1. General Description
SPECIFICATION
The EM78611 is a series of Universal Serial Bus 8-bit RISC microcontrollers. It is specifically designed for USB low speed device application and to support legacy device such as PS/2 keyboard. The EM78611 also support one device address and three endpoints. With no firmware involved, these series of microcontrollers can automatically identify and decode Standard USB Command to EndPoint Zero. The EM78611 is implemented on a RISC architecture. It has eight-level stack and six interrupt sources. Each device has 144 bytes of general purpose SRAM and 6K bytes of program ROM. The EM78611 has up to 13 pins with the capacity of sinking large current. It also has dual clock mode which allows the device to run on very low power saving frequency
2. Features
Operating voltage 4.4V ~ 5.25V Low-cost solution for low-speed USB devices, such as keyboard, joystick, and Gamepad. USB Specification Compliance Universal Serial Bus Specification Version 1.1 USB Device Class Definition for Human Interface Device (HID), Firmware Specification Version 1.1 Support 1 device address and 3 endpoints USB Application P75(D-) has an internal pull-high resistor (1.5K Ohm) USB protocol handling USB device state handling Identifying and decoding of Standard USB commands to EndPoint Zero PS/2 Application Support Auto-detects PS/2 or USB port Build-in PS/2 port interface for keyboard and mouse Built-in 8-bit RISC MCU 8 level stacks for subroutine and interruption Six available interruptions 8-bit real time clock/counter (TCC) with overflow interruption This spec. may change without further notice. 1 06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
Built-in RC oscillator free running for WatchDog Timer and Dual clock mode Two independent programmable prescalers for WDT and TCC Two methods of saving power: 1. Power-down mode (SLEEP mode) 2. Dual clock mode. Two clocks per instruction cycle I/O Ports Up to 13 LED sink pins Each GPIO pin of Ports 5, 6, 8, and 9; has an internal programmable pull-high resistor (25K Ohm) Each GPIO pin of Port 6, P74~P77, and Port 9 can wakeup the MCU from sleep mode by input state change Internal Memory Built-in 6K*13 bits Program ROM Built-in 144 bytes general purpose registers (SRAM) Built-in USB Application FIFOs. Operation Frequency Normal Mode: MCU runs at the external oscillator frequency; 6MHz or 12MHz Dual Clock Mode: MCU runs at the frequency of 256KHz (or 32KHz, 4KHz, 500Hz), emitted by the internal oscillator with the external ceramic resonator (or crystal) turned off to save power. Built-in 3.3V Voltage Regulator For MCU power supply Pull-up source for the external USB resistor on D-pin. Package Type: 40 pin PDIP (EM78611AP) 44 pin QFP (EM78611AQ)
This spec. may change without further notice.
2
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
3. Applications
USB Keyboard only. USB and PS/2 both compatible with Keyboard. USB Keyboard with USB Mouse. USB Joystick.
This spec. may change without further notice.
3
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
4. Pin Configuration
EM78611AP (40-Pin DIP)
VSS V3.3 D+ / CLK / P74 D- / DATA / P75 P90 P91 P92 P93 P94 P95 P50 P51 P52 P53 P54 P55 P56 P57 P80 P81 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 OSCO OSCI VDD P70 P71 P72 P67 P66 P65 P64 P63 P62 P61 P60 P87 P86 P85 P84 P83 P82
EM78611AQ (44-Pin QFP)
D- / DATA / P75 D+ / CLK / P74
OSCO
OSCI
VDD
V3.3
VSS
P90
P76
P77 35
44
43
42
41
40
39
38
37
36
P91 P92 P93 P94 P95 P96 P97 P50 P51
1 2 3 4 5 6 7 8 9
34 33 32 31 30 29 28 27 26 25 24 23
*
P70
P71 P72 P67 P66 P65 P64 P63 P62 P61 P60 P87
P52 10 P53 11 12 13 14 15 16 17 18 19 20 21 P85 22 P86
P54
P55
P56
P57
P80
P81
P82
P83
This spec. may change without further notice.
4
P84
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
5. Pin Description
Pin Number P50 ~ P57 P60 ~ P67 P80 ~ P87 P90 ~ P97 P70 ~ P72, P76, P77 I/O I/O Function GPIO pins. These pins can be pulled-high internally through software control. GPIO pins. These pins can be pulled-high internally through software control or LED sink pins. LED sink pins. P76, P77 will have an internal pulled-high resistor when the EM78611 is running under PS/2 mode. USB plus data line interface or CLK for PS/2 keyboard. When the EM78611 is running under PS/2 mode, this pin will have an internal pulled-high resistor (4.7K Ohm), with VDD=5.0V. USB minus data line interface or DATA for PS/2 keyboard. When the EM78611 is running under PS/2 mode, this pin will have an internal pulled-high resistor (4.7K Ohm), with VDD=5.0V. When the EM78611 is running under USB mode, this pin will have an internal pulled-high resistor, 1.5k Ohm, with V3.3=3.3V. 6MHz / 12MHz ceramic resonator or crystal input. Return path for 6-MHz / 12MHz ceramic resonator or crystal. Power supply pin. Ground pin. 3.3v regulator output.
I/O
I/O
D+ / CLK / P74
I/O
D- / DATA / P75
I/O
OSCI OSCO VDD GND V3.3
I O PWR PWR PWR
This spec. may change without further notice.
5
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
6. Block Diagram
OSCI OSCO VDD V3.3 D+ DR2 (PC) Stack1 Stack2 Stack3 Built-in RC Oscillator Tim ing Control 3.3V Regulator Transceiver Stack4 ROM Stack5 Stack6 USB Device Controller Prescaler W DT Reset & Sleep & W ake up Control Prescaler TCC RAM Interrupt Control W DT Tim er R1 (TCC) R4 (RSR) ALU Instruction Decoder ACC Stack7 Stack8 Instruction register R3 (Status)
DATA & CONTROL BUS
P74/D+/Clk P75/D-/Data
I/O Port 7
P70 P71 P72 P76 P77
I/O Port 9
P90 P91 P92 P93 P94 P95 P96 P97
I/O Port 8
P80 P81 P82 P83 P84 P85 P86 P87
I/O Port 6
P60 P61 P62 P63 P64 P65 P66 P67
I/O Port 5
P50 P51 P52 P53 P54 P55 P56 P57
7. Function Description
The EM78611memory is organized into three spaces, namely; User Program memory in 6K*13 bits ROM space, Data Memory in 144 bytes SRAM space, and USB Application FIFOs for EndPoint0, EndPoint1, and EndPoint2. Furthermore, several registers are used for special purposes.
7.1 Program Memory
The program space of the EM78611 is 6K bytes, and is divided into six pages. Each page is 1K bytes long. After Reset, the 13-bit Program Counter (PC) points to location zero of the program space. The Interrupt Vector is at 0x0001 and accommodates TCC interrupt, P74~P77 State Changed interrupt, EndPoint 0 interrupt, USB Suspend interrupt, USB Reset interrupt, and USB Host Resume interrupt. After an interrupt, the MCU will fetch the next instruction from the corresponding address as illustrated in the following diagram. This spec. may change without further notice. 6 06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
After reset
PC 0x0000 0x0001 0x03FF 0x0400 0x07FF 0x0800 0x0BFF 0x0C00 0x0FFF 0x1000 0x13FF 0x1400 0x17FF
Address Reset Vector Interrupt Vector Page 0 Page 1 Page 2 Page 3 Page 4 Page 5
7.2
Data Memory
The Data Memory has 144 bytes SRAM space. It is also equipped with USB Application FIFO space for USB Application. The Figure 7.1 (next page) shows the organization of the Data Memory Space.
7.2.1 Special Purpose Register
When the microcontroller executes instruction, specific registers are invoked for assistance, such as; Status Register which records the calculation status, Port I/O Control Registers which control the I/O pins' direction, etc. EM78611 provides a lot of other special purpose registers for different functions. Note that Special Control Registers can only be read or written by two instructions: IOR and IOW.
This spec. may change without further notice.
7
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 : 1F R0 R1( TCC) R2( C) P R3( Statu s) R4( RSR ) R5( Port5 ) R6( Port6 ) P7(Port 7) R8( Port8 ) R9( Port9 ) RA RB RC(USBSR) RD(FIFO A) RE(FIFO DR) RF( ISR) Stack (8 leve ls) 0 1 2 3 4 5 6 7
00 Endpoint 0 01 EndPo i nt : address 0F 0_s 10 EP tatus 11 : 1F EP_s tatus
IOC5 IOC6 IOC7 IOC8 IOC9 IOCA IOCB IOCC IOCD IOCE IOCF
16x8 Com m on Register
00 20 21 : 3F
01
10
11
32x8Ban k Register (Bank0)
32x8 Bank Reg ister (Ban k1)
32x8Ban k 32x Bank 8 Register (Bank2) Register (B ank3)
Fig 7.1 The Organization of EM78611 Data RAM
7.2.1.1 Operation Registers
The following sections will introduce each of the Operation Registers of the Special Purpose Registers. The Operation Registers are arranged according to the order of registers' address. Note that some registers are read only, while others are both readable and writable. R0 (Indirect Addressing Register) Default Value: (0B_0000_0000) R0 is not a physically implemented register. Its major function is to be an indirect addressing pointer. Any instruction using R0 as a pointer actually accesses the data pointed by the RAM Select Register (R4). This spec. may change without further notice. 8 06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
R1 (Time / Clock Counter) Default Value: (0B_0000_0000) This register TCC, is an 8-bit timer or counter. It is readable and writable as any other register. After Power-on reset and WatchDog reset, the initial value of this register is 0x00. R2 (Program Counter & Stack) Default Value: (0B_0000_0000) The EM78611 Program Counter is a 13-bit long register that allows accessing 6k bytes of Program Memory with 8 level stacks. The eight LSB bits, A0~A7, are located at R2, while the three MSB bits, A12~A10, are located at R3. The Program Counter is cleared after Power-on reset or WatchDog reset. The first instruction that is executed after a reset is located at address 00h.
CALL A12 A11 A10 A9 0000 000 Page 0 03FF 0400 001 Page 1 07FF 0800 010 Page 2 0BFF 0C00 011 Page 3 0FFF 100 1000 Page 4 13FF 101 1400 Page 5 17FF A8 A7 ~ A0 RET RETL RETI Stack 1 Stack 2 Stack 3 Stack 4 Stack 5 Stack 6 Stack 7 Stack 8
000 :
Reset location
This spec. may change without further notice.
9
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
R3 (Status Register) Default Value:(0B_0001_1XXX)
7 PS2 6 PS1 5 PS0 4 T 3 P 2 Z 1 DC 0 C
R3 [0] R3 [1] R3 [2]
Carry flag. Auxiliary carry flag. Zero flag. It will be set to 1 when the result of an arithmetic or logic operation is zero. Power down flag. It will be set to 1 during Power-on phase or by "WDTC" command and cleared when the MCU enters into Power down mode. It remains in previous state after WatchDog Reset. 1: Power-on. 0: Power down
R3 [3]
R3 [4]
Time-out flag. It will be set to 1 during Power-on phase or by "WDTC" command. It is reset to 0 by WDT time-out. 1: WatchDog timer no overflow. 0: WatchDog timer overflow.
The various states of Power down flag and Time-out flag at different conditions are shown below:
T 1 1 0 1 1 P 1 1 *P 0 0 Condition Power-on reset WDTC instruction WDT time-out Power down mode Wakeup caused by port change during Power down mode *P: Previous status before WDT reset
R3 [5-7] Page selection bits. These three bits are the used to select the page of program memory.
PS2 0 0 0 0 1 1 PS1 0 0 1 1 0 0 PS0 0 1 0 1 0 1 Program Memory Page [Address] Page 0 [0000-03FF] Page 1 [0400-07FF] Page 2 [0800-0BFF] Page 3 [0C00-0FFF] Page 4 [1000-13FF] Page 5 [1400-17FF]
This spec. may change without further notice.
10
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
R4 (RAM Select Register) Default Value: (0B_00XX_XXXX)
7 BK1 6 BK0 5 Ad5 4 Ad4 3 Ad3 2 Ad2 1 Ad1 0 Ad0
R4 (RAM select register) contains the address of the registers. R4 [0~5] are used to select registers in 0x00h~0x3Fh. The address 0x00~0x1F is common space. After 0x1Fh, SRAM are divided into four banks. Use Bank Select Register. R4 [6,7] to select the registers bank (refer to the table below).The following are two examples: (1) R4=0001100 and R4=1001100 point to the same register 0x0Ch. Since 0x0Ch is in the common space, Bit 6 and Bit 7 are meaningless. (2) R4=0111100 points to the register 0x3C in Bank 2.
R4[7]Bk1 0 0 1 1 R4[6]Bk0 0 1 0 1 RAM Bank # Bank 0 Bank 1 Bank 2 Bank 3
R5 (Port5 I/O register) Default Value: (0B_0000_0000)
7 P57 6 P56 5 P55 4 P54 3 P53 2 P52 1 P51 0 P50
R6 (Port 6 I/O register) Default Value: (0B_0000_0000)
7 P67 6 P66 5 P65 4 P64 3 P63 2 P62 1 P61 0 P60
R7 (Port7 I/O register) Default Value: (0B_0000_0000)
7 P77 6 P76 5 D- / P75 / DATA 4 D+ / P74 / CLK 3 2 P72 1 P71 0 P70
R8 (Port 8 I/O register) Default Value: (0B_0000_0000)
7 P87 6 P86 5 P85 4 P84 3 P83 2 P82 1 P81 0 P80
R9 (Port 9 I/O register)
7 P97 6 P96 5
Default Value: (0B_0000_0000)
4 P94 3 P93 2 P92 1 P91 0 P90
P95
This spec. may change without further notice.
11
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
This spec. may change without further notice.
12
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
RC (USB Application Status Register) Default Value: (0B_0000_0000)
7 EP0_W 6 EP0_R 5 EP1_R 4 EP2_R 3 EP2_W 2 1 0 Stall Host_Suspend EP0_Busy
RC [0] Stall flag
While MCU receives an unsupported command or invalid parameters from host, this bit will be set to 1 by the firmware to notify the UDC to return a STALL handshake. When a successful SETUP transaction is received, this bit is cleared automatically. This bit is readable and writable.
RC [1] EP0_Busy flag When this bit is equal to "1," it indicates that the UDC is writing data into the EP0'FIFO or reading data from it. During this time, the firmware will avoid accessing the FIFO until UDC finishes writing or reading. This bit is only readable. RC [2] Host Suspend flag If this bit is equal to 1, it indicates that USB bus has no traffic for the specified period of 3.0 ms. This bit will also be cleared automatically when there is bus activity. This bit is only readable. RC [3] EP2_W flag This bit is set when the UDC receives a successful data from USB Host to EP2. Upon detecting that this bit is equal to One, the firmware will execute a read sequence to the EP2's FIFO, then clear this bit. Otherwise, the subsequent data from USB Host won't be accepted by the UDC. RC [4,5,6] EP0_R / EP1_R / EP2_R flag These three bits inform the UDC to read the data written by the firmware from the FIFO. Then the UDC will send the data to the Host automatically. After UDC finishes reading the data from the FIFO, this bit will be cleared automatically. Therefore, before writing data into FIFO's, the firmware will first check this bit to avoid overwriting the data. These two bits can only be set by the firmware and cleared by the hardware. RC [7] EP0_W flag After the UDC completes writing data to the FIFO, this bit will be set automatically. The firmware will clear it as soon as it gets the data from EP0's FIFO. Only when this bit is cleared that the UDC will be able to write a new data into the FIFO. Therefore, before the firmware can write a data into the FIFO, this bit must first be set by the firmware to prevent UDC from writing data at the same time. This bit is both readable and writable.
This spec. may change without further notice.
13
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
RD (USB Application FIFO Address Register) Default Value: (0B_0000_0000)
7 0 6 0 5 0 4 UAD4 3 UAD3 2 UAD2 1 UAD1 0 UAD0
RD [0~4]
USB Application FIFO address registers. These five bits are the address pointer of USB Application FIFO. Undefined registers. The default value is zero.
RD [5~7]
RE (USB Application FIFO Data Register) Default Value: (0B_0000_0000)
7 UD7 6 UD6 5 UD5 4 UD4 3 UD3 2 UD2 1 UD1 0 UD0
RE (USB Application FIFO data register) contains the data in the register of which address is pointed by RD. RF (Interrupt Status Register ) Default Value: (0B_0000_0000)
7 USB Host Resume_IF 6 5 4 3 2 1 0 TCC_IF
Port7 state USB USB EP0_IF change_1F Reset_IF Suspend_IF
RF [0]
TCC Overflow interrupt flag. It will be set while TCC overflows, and is cleared by the firmware. EndPoint Zero interrupt flag. It will be set when the EM78611 receives Vender /Customer Command to EndPoint Zero. This bit is cleared by the firmware. USB Suspend interrupt flag. It will be set when the EM78611 finds the USB Suspend Signal on USB bus. This bit is cleared by the firmware. USB Reset interrupt flag. It will be set when the host issues the USB Reset signal. Port 7 State Change interrupt flag. It will be set at P.74 ~ P.77 State Change when the EM78611 is not running under USB mode. USB Host Resume interrupt flag. It will be set only under Dual clock mode when the USB suspend signal becomes low.
RF [1]
RF [2]
RF [3]
RF [4]
RF [7]
7.2.1.2 Control Registers
Some special purpose registers are available for special control purposes. Except for the Accumulator (A), these registers must be read and written by special instructions. One of these registers, CONT, can only be read by the instruction "CONTR" and written by "CONTW" instruction. The other special control registers can be read by the instruction This spec. may change without further notice. 14 06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
"IOR" and written by the instruction "IOW." The following paragraphs only describe the general functions of the control registers. For more detailed description, refer to Sections 8.7 to 8.9 of this spec. A (Accumulator Register) The accumulator is an 8-bit register that holds operands and results of arithmetic calculations. It is not addressable. CONT (Control Register) Default Value: (0B_0011_1111)
7 LED 6 /INT 5 TSR2 4 TSR1 3 TSR0 2 PSR2 1 PSR1 0 PSR0
Except for Bit-6 (Interrupt enable control bit), CONT register can be read by the instruction "CONTR" and written by the instruction "CONTW." CONT [0~2] WatchDog Timer prescaler bits. These three bits are used as the prescaler of WatchDog Timer. CONT [3~5] TCC Timer prescaler bits. The relationship between the prescaler value and these bits are shown below:
PSR2/TSR2 0 0 0 0 1 1 1 1 PSR1/TSR1 0 0 1 1 0 0 1 1 PSR0/TSR0 0 1 0 1 0 1 0 1 TCC Rate 1: 2 1: 4 1: 8 1: 16 1: 32 1: 64 1: 128 1: 256 WDT Rate 1: 1 1: 2 1: 4 1: 8 1: 16 1: 32 1: 64 1: 128
CONT [6] Interrupt enable control bit. This bit toggles Interrupt function between enable and disable. It is set to 1 by the interrupt disable instruction "DISI" and reset by the interrupt enable instructions "ENI" or "RETI." 0: Enable the Interrupt function. 1: Disable the Interrupt function. Note that this bit can be read only by the instruction "CONTR" CONT [7] LED bit. This bit is used to enable the LED sink capacity of P76 and P77. 0: Disable the LED sink capacity of P76, P77. 1: Enable the LED sink capacity of P76, P77. This spec. may change without further notice. 15 06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
IOC5 ~IOC9 I/O Port Direction Control Registers These are I/O port (Port5 ~ Port7) direction control registers. Each bit controls the I/O direction of three I/O ports respectively. When these bits are set to 1, the relative I/O pins become input pins. Similarly, the I/O pins becomes outputs when the relative control bits are cleared. 1: Input direction. 0: Output direction. IOCA (Operation Mode Control Register) Default Value: (0B_1100_0000)
7 Dual_Frq.1 6 Dual_Frq.0 5 4 3 2 1 PS/2 0 USB
IOCA [0,1] These two bits are used to select the operation mode. EM78611 can auto-detect the type of port device being attached. After identifying the port, the firmware will set these two bits to enter into a proper operation mode. The definition of these two control registers is described in the table below.
IOCA[1] 0 0 1 1 IOCA[0] 0 1 0 1 Operation Mode Detect Mode USB Mode PS/2 Mode USB Test Mode
IOCA [6,7]
Selects the operation frequency in Dual Clock Mode. Four frequencies are available and can be chosen as Dual Clock Mode for running the MCU program.
Dual_Frq.1 0 0 1 1 Dual_Frq.0 0 1 0 1 Frequency 500Hz 4kHz 32kHz 256kHz
IOCB (Port 9 Wake-up Pin Select Register) Default Value: (0B_1111_1111)
7 /P97 6 /P96 5 /P95 4 /P94 3 /P93 2 /P92 1 /P91 0 /P90
IOCB [0~7]
These bits are used to select which of the Port 9 pins is to be assigned to wakeup the MCU while in Power down mode. 0: Enable the function. 1: Disable the function.
This spec. may change without further notice.
16
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
IOCC (Port 9 LED Sink Capacity Control Register) Default Value: (0B_0000_0000)
7 P97 6 P96 5 P95 4 P94 3 P93 2 P92 1 P91 0 P90
IOCC [0~7]
LED sink control bit. These bits are used to enable the LED sink capacity of P90 ~ P93, P95, and P96. 0: Disable the LED sink capacity of respective pin. 1: Enable the LED sink capacity of respective pin.
IOCD (Port 9 Pull High Control Register) Default Value: (0B_1111_1111)
7 /PH97 6 /PH96 5 /PH95 4 /PH94 3 /PH93 2 /PH92 1 /PH91 0 /PH90
IOCD [0~7] These bits control the 25KOhm pull-high resistor of individual pins in Port 9. 1: Disable the function of pull-high. 0: Enable the function of pull-high. IOCE (Special Function Control Register) Default Value: (0B_1101_01111)
7 /Dual clock 6 /WUE 5 WTE 4 RUN 3 Device_Resume 2 /PU8 1 /PU6 0 /PU5
IOCE [0,1,2] Port 5, Port 6, and Port 8 pull-high control bits. 1: Disable 0: Enable IOCE [3] Device Resume control bit. Writing this bit to "1" can generate Device Resume signal on USB bus. As long as the USB bus is not idle, this bit will be cleared at the same time. Run bit. This bit can be cleared by the firmware and set during power-on, or by the hardware at the falling edge of wake-up signal. When this bit is cleared, the clock system is disabled and the MCU enters into Power down mode. At the transition of wake-up signal from high to low, this bit is set to enable the clock system. 1: Run mode. The EM78611 is working normally. 0: Sleep mode. The EM78611 is in power down mode. This spec. may change without further notice. 17 06/10/2003 (V1.0)
IOCE [4]
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
IOCE [5] WatchDog Timer enable bit. The bit disable/enables the WatchDog Timer. 1: Enable WDT. 0: Disable WDT. IOCE [6] Enable the wake-up function as triggered by port-changed. This bit is set by UDC. 1: Disable the wake-up function. 0: Enable the wake-up function. IOCE [7] Dual clock Control bit. This bit is used to select the frequency of system clock. When this bit is cleared, the MCU will run on very low frequency for power saving and the UDC will stop working. 1: Selects EM78611 to run on normal frequency. 0: Selects to run on slow frequency. IOCF (Interrupt Mask Register)
7 USB Host Resume_IE 6 5 -
Default ValueG
4 Port7 state change_1E 3
(0B_0000_0000)
2 USB Suspend_IE 1 EP0_IE 0 TCC_IE
USB Reset_IE
IOCF [0~4,7]
TCC / EP0 / USB Suspend / USB Reset / Port 7 State Change / USB Host Resume interrupt enable bits. These eight bits control the function of TCC interrupt, EP0 interrupt, USB Suspend interrupt, USB Reset interrupt, Port7 State Change interrupt and USB Host Resume interrupt respectively. Individual interrupt is enabled by setting its associated control bit in the IOCF to "1." 1: Enable Interrupt. 0: Disable Interrupt.
Only when the global interrupt is enabled by the ENI instruction that the individual interrupt will work. After DISI instruction, any interrupt will not work even if the respective control bits of IOCF are set to 1. The USB Host Resume Interrupt works only under Dual clock mode. This is because when the MCU is under sleep mode, it will be waked up by the UDC Resume signal automatically.
7.2.2 USB Application FIFOs
For USB Application, EM78611 provides an 8-byte First-In-First-Out (FIFO) buffer for each endpoint. The buffer cannot be accessed directly. However, a corresponding Data Byte This spec. may change without further notice. 18 06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
Pointer register for each endpoint is made available to address the individual byte of the FIFO buffer. The content of the individual byte will map to a special register.
7.3
USB Application
EM78611 is designed specially for USB device application and has many powerful functions that help the firmware to free itself from complex situation in various aspects of USB application.
7.3.1 Auto-Detect PS/2 or USB Mode
When the EM78611 is connected to the bus, it will auto-detect and identify which type of bus (USB or PS/2) it is connected to. The condition that influences auto-detect function is described below: 1. After a Power-on reset, the initial value of IOCA [0,1] is 0b00. Thus the operation mode is "Detect mode" and the D+ and D- IO pins are internal pulled high by 200KOhm to VDD. 2. The firmware checks the state of R7 [4,5]. If the state of this two bit is 0b00, set the IOCA [0] to "1" to define the "USB mode." Otherwise, set the IOCA [1] to "1," to define "PS/2 mode." 3. When the operation mode is defined as "USB mode," the D- IO pin will be internal pulled high by a 1.5KOhm resistor to 3.3V, which is output from a built-in regulator. 4. If the operation mode is in "PS/2 mode," both of the PS/2 interface IO pins are internal pulled high to VDD. {NOTE] If the auto-detect function is not used, the firmware should set the operation mode, either USB mode or PS/2 mode, in the beginning of program. An additional mode, "USB Test Mode" is also available. This mode has no load on D+ and D- IO pins, and can only be used in USB Application case. Therefore, an external 1.5KOhm resistor is needed to pull up D- IO pin to 3.3V. Under PS/2 mode, both PS/2 pins are programmed to generate an interrupt. After setting the P.74 ~ P.77 State changed Interrupt Enable bit, the MCU will interrupt while the state of these four pins changes.
7.3.2 USB Device Controller
The USB Device Controller (UDC) built-in in the EM78611 can interpret the USB Standard Command and response automatically without involving firmware. The embedded Series Interface Engine (SIE) handles the serialization and deserialization of actual USB transmission. Thus, a developer can concentrate his efforts more in perfecting the device actual functions and spend less energy in dealing with USB transaction. This spec. may change without further notice. 19 06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
The UDC handles and decodes most Standard USB commands defined in the USB Specification Rev1.1. If UDC receives an unsupported command, it will set a flag to notify MCU the receipt of such command. The Standard Commands that EM78611 supports includes; Clear Feature, Get Configuration, Get Interface, Get Status, Set Address, Set Configuration, Set Feature, and Set Interface. Each time UDC receives a USB command, it writes the command into EP0's FIFO. Only when it receives unsupported command that the UDC will notify the MCU through interrupt. Therefore, EM78611 is very flexible under USB application because the developer can freely choose the method of decoding the USB command as dictated by different situation.
7.3.3 Device Address and Endpoints
EM78611 supports one device address and three endpoints, EP0 for control endpoint, EP1 and EP2 for interrupt endpoint. Sending data to USB host in EM78611 is very easy. Just write data into EP's FIFO, then set flag, and the UDC will handle the rest. It will then confirm that the USB host has received the correct data from EM78611.
7.4
Reset
The EM78611 provides three types of reset: (1) Power-on Reset, (2) WatchDog Reset, and (3) USB Reset.
7.4.1 Power-On Reset
Power-on Reset occurs when the device is attached to power and a reset signal is initiated. The signal will last until the MCU becomes stable. After a Power-on Reset, the MCU enters into following predetermined states (see below), and then, it is ready to execute the program. a. The program counter is cleared. b. The TCC timer and WatchDog timer are cleared. c. Special registers and Special Control registers are all set to initial value. The MCU also has a low voltage detector that detects low output power condition. Whenever the output voltage of the 3.3V regulator decreases to below 2.2V, a reset signal is set off.
7.4.2 WatchDog Reset
When the WatchDog timer overflows, it causes the WatchDog to reset. After it resets, the program is executed from the beginning and some registers will be reset. The UDC however, remains unaffected.
This spec. may change without further notice.
20
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
7.4.3 USB Reset
When UDC detects a USB Reset signal on USB Bus, it interrupts the MCU, then proceed to perform the specified process that follows. After a USB device is attached to the USB port, it cannot respond to any bus transactions until it receives a USB Reset signal from the bus.
This spec. may change without further notice.
21
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
7.5 Saving Power Mode
The EM78611 provides two options of power-saving modes for energy conservation, i.e., Power Down mode and Dual clock mode.
7.5.1 Power Down Mode
The EM78611 enters into Power Down mode by clearing the RUN register (IOCE[4]). During this mode, the oscillator is turned off and the MCU goes to sleep. It will wake up when signal from USB host is resumed, or when the WatchDog reset or the input port state changes. If the MCU wakes up when I/O port status changes, the direction of I/O port should be set at input direction, then read the state of port. For example: : // Set the Port 6 to input port MOV A , 0XFF IOW PORT6 // Read the state of Port 6 MOV PORT6, PORT6 // Clear the RUN bit IOR 0XE AND A , 0B11101111 IOW 0XE : : If the MCU is awaken by a USB Resume signal, the next instruction will be executed and one flag, RC[3] will be set to 1.
7.5.2 Dual Clock Mode
The EM78611 has one internal oscillator for power saving application. Clearing the Bit IOCE [7] will enable the low frequency oscillator. At the same time, the external oscillator will be turned off. Then the MCU will run under very low frequency to conserve power. Four types of frequency are available for selection in setting Bits IOCA [6, 7]. The USB Host Resume Interrupt can only be used in this mode. If this interrupt is enabled, the MCU will be interrupted when the USB Suspend signal is detected on USB Bus.
This spec. may change without further notice.
22
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
7.6 Interrupt
The EM78611 has one interrupt vectors in 0x0001. When an interrupt occurs during the MCU running program, it will jump to the interrupt vector (0x0001) and execute the instructions sequentially from interrupt vector. RF is the interrupt status register, which records the interrupt status in the relative flags/bits. The interrupt condition could be one of the following: 1. TCC Overflow: When the Timer Clock / Counter Register (R1) overflows, the status flag RF[0] will be set to 1. Its interrupt vector is 0X0001. When the input signals in Port 7 changes, the status flag RF[4] will be set to 1. Its interrupt vector is 0X0001. When the UDC successfully accepts a setup transaction from host to EndPoint0, the status flag RF[1] is set to 1. Its interrupt vector is 0X0001. When UDC detects a USB Suspend signal on USB bus, the status flag RF[2] is set to 1. Its interrupt vector is 0X0001. When the UDC detects a USB Reset signal on USB bus, the status flag R[3] is set to 1. Its interrupt vector is 0X0001. When UDC detects that the USB bus is no longer in Suspend condition and without Device Resume signal, the status flag R[7] is set to 1. Its interrupt vector is 0X0001.
2. Port7 State Change:
3. EP0 interrupt:
4. USB suspend:
5. USB Reset:
6. USB Host Resume:
IOCF is an interrupt mask register which can be set bit by bit. While their respective bit is written to 0, the hardware interrupt will inhibit, that is, the EM78611 will not jump to the interrupt vector to execute instructions. But the interrupt status flags still records the conditions no matter whether the interrupt is masked or not. The interrupt status flags must be cleared by firmware before leaving the interrupt service routine and enabling interrupt. The global interrupt is enabled by the ENI (RETI) instruction and is disabled by the DISI instruction.
8. Absolute Maximum Ratings
Symbol Temperature under bias Storage temperature Input voltage Output voltage Min 0 -65 -0.5 -0.5 Max 70 150 6.0 6.0 Unit C C V V
This spec. may change without further notice.
23
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
9. DC Electrical Characteristic
(T = 25C, VDD=5V, VSS=0V)
Symble Parameter Condition 3.3V Regulator VRag VResetL VResetH Output voltage of 3.3v Regulator Low Power Reset detecting low Voltage Low Power Reset detecting high Voltage MCU operating IIL VIHX VILX ICC1 Input Leakage Current for input pins Clock Input High Voltage Clock Input Low Voltage VDD operating supply current - Normal frequency operation mode VDD operating supply current - Normal frequency operation mode VDD operating supply current - Dual clock mode Operating supply current 1 - Power down mode VIN=VDD,VSS OSCI OSCI Crystal type Freq. = 6MHz Output pins floating Crystal type Freq. = 12MHz Output pins floating RC oscillation type Freq. = 256kHz Ouput pins floating All input and I/O pins at VDD Output pins floating WDT disabled GPIO Pins VIH VIL VOH1 VOH2 VOH3 VOL1 VOL2 VOL3 VOL4 VOL5 Input High Voltage Input Low Voltage Output High Voltage (P70~P73,P76 and P77) Output High Voltage (P74, P75) Output High Voltage (Port5 & Port6 & Port8 and P90~P93, P95, P96) Output Low Voltage (P76 and P77 normal mode) Output Low Voltage (P74, P75) Output Low Voltage (P70~P73,P76 and P77 sink LED) Output Low Voltage (P90 ~ P96 normal mode) Output Low Voltage (P90 ~ P96 sink LED) Port 5 & Port 6 & Port 7 & Port 8 & Port 9 Port 5 & Port 6 & Port 7 & Port8 & Port 9 ISink = 10.0mA VDD = 5V ISink = 5.0mA VDD = 5V ISink = 10.0mA VREG = 3.3V ISink = 10.0mA VDD = 5V ISink = 5.0mA VDD = 5V ISink = 10.0mA VDD = 5V ISink = 10.0mA VREG = 3.3V ISink = 10.0mA VREG = 3.3V 2.0 2.4 2.4 2.4 0.4 0.4 3 0.4 1 0.8 V V V V V V V V V V 2.5 O1 1.0 10 gA V V mA 3.0 VDD = 4.4V ~ 5.25V 3.0 3.3 3.6 2.2 V V V Min Type Max Unit
ICC2
-
-
20
mA
ICC3
-
-
250
gA
ISB1
-
-
100
gA
This spec. may change without further notice.
24
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
IPH1 Input current with pull-high resister ( Port 5, 6, 8, P.90 ~ P.93, P.95 ~ P.96) Input current with pull-high resister ( P.74 ~ P.75) Input current with pull-high resister ( P.76 ~ P.77) Input pin with pull-high resistor (25kOhm) VIN = VSS Input pin with pull-high resistor (4.7kOhm) VIN = VSS Input pin with pull-high resistor (2.2kOhm) VIN = VSS USB Interface VOH VOL VDI VCM VSE CIN VRG Static Output High Static Output Low Differential Input Sensitivity Differential Input Command Mode Range Single Ended Receiver Threshold Transceiver Capacitance Output Voltage of Internal Regulator USB operation Mode USB operation Mode 2.8 0.2 0.8 0.8 3.0 3.6 0.3 2.5 2.0 20 3.6 V V V V V pF V 125 gA
IPH2
1.06
mA
IPH2
2.27
MA
This spec. may change without further notice.
25
06/10/2003 (V1.0)
EM78611
Universal Serial Bus Microcontroller Series
Preliminary
(c) 2003 ELAN Microelectronics Corporation All Rights Reserved
Printed in Taiwan, ROC, 05/2003
The contents of this specification are subject to change without notice. ELAN Microelectronics assumes no responsibility for errors that may appear in this specification. ELAN Microelectronics makes no commitment to update, or to keep current, the information contained in this specification. The products described herein are not intended for use in life support appliances, devices, or systems. Use of ELAN Microelectronics products in such applications are not supported and is prohibited. NO PART OF THIS SPECIFICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS WITHOUT THE EXPRESS WRITTEN PERMISSION OF ELAN MICROELECTRONICS.
ELAN
MICROELECTRONICS
CORPORATION
Headquarters:
No. 12, Innovation Road 1, Science-based Industrial Park, Hsinchu, Taiwan, R.O.C. Tel: +886 3 5639977 Fax: +886 3 5639966 http://www.emc.com.tw
Hong Kong Office:
Rm. 1005B, 10/F Empire Centre 68 Mody Road, Tsimshatsui Kowloon , HONG KONG Tel: +852 2838-8715 Fax: +852 2838-0497
This spec. may change without further notice.
26
06/10/2003 (V1.0)


▲Up To Search▲   

 
Price & Availability of EM78611

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X